gsk: Normalize rects in GLSL
authorMatthias Clasen <mclasen@redhat.com>
Sat, 15 Apr 2023 20:50:34 +0000 (22:50 +0200)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 1 May 2023 17:43:33 +0000 (13:43 -0400)
commitad65db901ac2dea869f450665b7cc6a082712755
treef2a2db7dc2e459973925d1c8e61fb6a830e23c76
parent406b1e2e03d18ecdc55b6e9e26539e7955cc75ff
gsk: Normalize rects in GLSL

Our coverage computation only works for well-behaved
rects and rounded rects. But our modelview transform
might flip x or y around, causing things to fail.

Add functions to normalize rects and rounded rects,
and use it whenever we transform a rounded rect in GLSL.
gsk/gl/resources/border.glsl
gsk/gl/resources/filled_border.glsl
gsk/gl/resources/inset_shadow.glsl
gsk/gl/resources/outset_shadow.glsl
gsk/gl/resources/preamble.fs.glsl
gsk/gl/resources/preamble.glsl